﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TESTCOM
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
        

        private void 关闭ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolsCOM.SendCmd("0A0F");
        }

        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolsCOM.SendCmd("0A0F");
            this.Close();
        }

        public void closeC()
        {
            toolsCOM.SendCmd("0A0F");
        }

        private void panel1_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A11");
        }

        private void panel2_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A12");
        }

        private void panel3_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A13");
        }

        private void panel4_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A14");
        }

        private void panel5_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A15");
        }

        private void panel6_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A16");
        }

        private void panel7_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A17");
        }

        private void panel8_Click(object sender, EventArgs e)
        {
            closeC();
            toolsCOM.SendCmd("0A0F0A18");
        }
    }
}
